package com.hk.springtrains.jms.async.ejb;

import javax.annotation.Resource;
import javax.ejb.MessageDriven;
import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;

@MessageDriven(mappedName = "jms/SpringTrains.topic")
public class ReceiveWithEJB implements MessageListener{

    @Resource
    private MessageDrivenContext messageDrivenContext;
    public ReceiveWithEJB() {

    }

    @Override
    public void onMessage(Message message) {
        System.out.println(message);
    }
}
